package biz.datalk.industrialland.admin.modules.system.service;

import biz.datalk.industrialland.admin.modules.system.pojo.dto.SysUserDTO;
import biz.datalk.industrialland.admin.modules.system.pojo.vo.SysUserVO;
import biz.datalk.industrialland.common.result.UnifyResult;
import biz.datalk.industrialland.mbg.pojo.po.SysDepart;
import biz.datalk.industrialland.mbg.pojo.po.SysRole;
import biz.datalk.industrialland.mbg.pojo.po.SysUser;

import java.util.List;

/**
 * @author tarofang@163.com
 * @date 2019年08月12日
 */

public interface ISysUserService {

    SysUser getUserByName(String username);

    UnifyResult list(SysUserDTO sysUserDTO);

    UnifyResult addUser(SysUserDTO sysUserDTO);

    UnifyResult updateUser(SysUserDTO sysUserDTO);

    /**
     * 变更用户状态
     *
     * @author       tarofang@163.com
     * @date         2020年05月28日
     *
     * @param sysUserDTO id, status
     */
    void changeStatus(SysUserDTO sysUserDTO);

    SysUserVO detailById(Long id);

    List<SysRole> getUserRoleBySysUserid(Long sysuserid);

    List<SysDepart> getUserDepartBySysUserid(Long sysuserid);

    int deleteUserRoleBySysUserid(Long sysuserid);
    int deleteUserDepartBySysUserid(Long sysuserid);

    int deleteById(Long id);

    void changePwd(SysUserDTO sysUserDTO);
}
